package com.uobgroup.ews.uam.core.service.ldap;

import com.uobgroup.ews.uam.core.domain.SecurityGroup;
import com.uobgroup.ews.uam.core.model.Group;
import com.uobgroup.ews.uam.core.model.Person;

public interface LDSService {

   public Person findUser(String username);

   public Group findGroup(String groupName);
   
   public Group findGroupByBaseDN(String groupName, String baseDn);

   public String createUser(Person person);

   public boolean deleteUser(Person person);

   public String createGroup(SecurityGroup group);

   public boolean deleteGroup(SecurityGroup group);

   public boolean hasGroupByBaseDN(String roleName, String baseDN);

   public boolean addAttribute(Person person, String attName, String attValue);

   public boolean updateAttribute(Person person, String attName, String attValue);

   public boolean hasAttribute(Person person, String attName);

   public void assignChildGroupToParent(SecurityGroup parent, SecurityGroup child);

   public void unassignChildGroupFromParent(SecurityGroup parent, SecurityGroup child);

   void assignUserToProfile(SecurityGroup parent, SecurityGroup child);

   void unassignUserFromProfile(SecurityGroup parent, SecurityGroup child);
}
